<template>
  <div class="m-recommend">
    <div class="m-recommend-item" v-for="item in list" :key="item.name">
      <div class="m-recommend-item-img">
        <img :src="item.image">
      </div>
      <div class="m-recommend-item-name">{{item.name}}</div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'mall-recommend',
  data () {
    return {
      list: [
        {
          name: '每日获得',
          image: require('../test-image/r-1.png')
        },
        {
          name: '热门排行',
          image: require('../test-image/r-2.png')
        },
        {
          name: '特价秒杀',
          image: require('../test-image/r-3.png')
        },
        {
          name: '每日上新',
          image: require('../test-image/r-4.png')
        },
        {
          name: '长期活动',
          image: require('../test-image/r-5.png')
        }
      ]
    }
  }
}
</script>

<style scoped lang="less">
.m-recommend{
  display: flex;
  justify-content: space-around;
  background: #fff;
  padding-bottom: .28rem;
  .m-recommend-item{
    width: .88rem;
  }
  .m-recommend-item-img{
    height: .88rem;
    background: #f5f5f5;
    border-radius: 4px;
    img{
      width: 100%;
      display: block;
    }
  }
  .m-recommend-item-name{
    font-size: .22rem;
    margin-top: .32rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
</style>
